<?php

namespace app\common\validate;

use think\Validate;

class CityAgent extends Validate
{
    /**
     * 验证规则.
     */
    protected $rule = [
        'name'       =>'require|min:1|max:50',
        'mobile'     =>'require|min:6|max:30',
        'city'       =>'require',
        'corporation'=>'require|min:2|max:100',
        'profession' =>'require|min:2|max:50',
        'msg'        =>''
    ];
    /**
     * 提示消息.
     */
    protected $message = [
    ];
    /**
     * 验证场景.
     */
    protected $scene = [
        'apply'  => [
            'name',
            'mobile',
            'city',
            'corporation',
            'profession',
            'msg'
        ],
    ];

    public function __construct()
    {
        $this->field = [
            'name'       =>'姓名',
            'mobile'     =>'联系电话',
            'city'       =>'加盟城市',
            'corporation'=>'企业名称',
            'profession' =>'从事行业',
            'msg'        =>'咨询留言'
        ];
        parent::__construct();
    }
}
